package com.kevin.ymqquan.activity;

import com.kevin.ymqquan.R;
import com.kevin.ymqquan.custom.CustomToast;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

public class ManageClubDetailActivity extends Activity {

	private String clubId;

	private TextView tv_clubuser_detail_name;
	private TextView tv_clubuser_detail_owner_right;
	private TextView tv_clubuser_detail_owerphone_right;
	private TextView tv_clubuser_detail_createdate_right;
	private TextView tv_clubuser_detail_joindate_right;
	private TextView tv_clubuser_detail_membercount_right;
	private Button btn_clubuser_detail_in;
	private Button btn_clubuser_detail_out;
	private Button btn_clubuser_detail_ti;
	private ImageView iv_clubuser_detail_back;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_manageclub_detail);

		Intent i = getIntent();
		String clubName = i.getStringExtra("clubName");
		String clubMemberCount = i.getStringExtra("clubMemberCount");
		String clubOwner = i.getStringExtra("clubOwner");
		String clubOwnerPhone = i.getStringExtra("clubOwnerPhone");
		String clubCreateDate = i.getStringExtra("clubCreateDate");
		String clubJoinDate = i.getStringExtra("clubJoinDate");
		clubId = i.getStringExtra("clubId");
		init();// 初始化
		// Log.i("kevinlog",
		// isJoin+"-"+clubName+"-"+clubMemberCount+"-"+clubOwner+"-"+clubOwnerPhone+"-"+clubCreateDate+"-"+clubJoinDate);

		tv_clubuser_detail_name.setText(clubName);
		tv_clubuser_detail_owner_right.setText(clubOwner);
		tv_clubuser_detail_owerphone_right.setText(clubOwnerPhone);
		tv_clubuser_detail_createdate_right.setText(clubCreateDate);
		tv_clubuser_detail_joindate_right.setText(clubJoinDate);
		tv_clubuser_detail_membercount_right.setText(clubMemberCount);
		// btn_clubuser_detail_apply.setText("最新活动");
	}
	

	private void init() {
		// TODO Auto-generated method stub
		tv_clubuser_detail_name = (TextView) findViewById(R.id.tv_clubuser_detail_name);
		tv_clubuser_detail_owner_right = (TextView) findViewById(R.id.tv_clubuser_detail_owner_right);
		tv_clubuser_detail_owerphone_right = (TextView) findViewById(R.id.tv_clubuser_detail_owerphone_right);
		tv_clubuser_detail_createdate_right = (TextView) findViewById(R.id.tv_clubuser_detail_createdate_right);
		tv_clubuser_detail_joindate_right = (TextView) findViewById(R.id.tv_clubuser_detail_joindate_right);
		tv_clubuser_detail_membercount_right = (TextView) findViewById(R.id.tv_clubuser_detail_membercount_right);
		btn_clubuser_detail_in = (Button) findViewById(R.id.btn_clubuser_detail_in);
		btn_clubuser_detail_out = (Button) findViewById(R.id.btn_clubuser_detail_out);
		btn_clubuser_detail_ti = (Button) findViewById(R.id.btn_clubuser_detail_ti);
		iv_clubuser_detail_back = (ImageView) findViewById(R.id.iv_clubuser_detail_back);

		iv_clubuser_detail_back.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				ManageClubDetailActivity.this.finish();
			}
		});
		btn_clubuser_detail_in.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				Intent i = new Intent(ManageClubDetailActivity.this,
						ClubUserActivity.class);
				i.putExtra("clubId", clubId);
				startActivity(i);
				// CustomToast.CustomActivityToast(MyClubDetailActivity.this,
				// "打开活动列表", 0);
			}
		});
		btn_clubuser_detail_out.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				Intent i = new Intent(ManageClubDetailActivity.this,
						ConClubActiveActivity.class);
				i.putExtra("clubId", clubId);
				i.putExtra("ti", "0");
				startActivity(i);
				// CustomToast.CustomActivityToast(MyClubDetailActivity.this,
				// "打开活动列表", 0);
			}
		});
		btn_clubuser_detail_ti.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				Intent i = new Intent(ManageClubDetailActivity.this,
						ConClubActiveActivity.class);
				i.putExtra("clubId", clubId);
				i.putExtra("ti", "1");
				startActivity(i);
				// CustomToast.CustomActivityToast(MyClubDetailActivity.this,
				// "打开活动列表", 0);
			}
		});

	}

}
